// 封装操作token的api

// 存储token的key
const token = 'hm-toutiao'

// 存token
const saveToken = obj => {
  localStorage.setItem(token, JSON.stringify(obj))
}

// 取token
const getToken = () => {
  return JSON.parse(localStorage.getItem(token))
}

// 删token
const removeToken = () => {
  localStorage.removeItem(token)
}

// 导出
export { saveToken, getToken, removeToken }
